-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xplat-intl: default to non intl compare for localeCompare #4625
xplat-intl: default to non intl compare for localeCompare #4625
Conversation
if (compareResult == 0 && size1 != size2) | ||
{ | ||
compareResult = size1 > size2 ? 1 : -1; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have to add 2 to compareResult because CompareStringEx returns 0 on error, 1 for less, 2 for equal, and 3 for greater. The rest of the code below assumes this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kept the impl. separate and added a comment to make the intention clear -> (once ICU interface supports this, keep the implementation below for non-icu!)
Also of note, this will be fixed even more once intl-icu merges back into master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo Jack's comment.
0936997
to
fa6274f
Compare
@jackhorton @dilijev Thanks for the review! |
@obastemur this doesn't seem to be working on xplat in 1.9 and master - I think it has broken CI (though it works on 1.8) |
The reason is the test baseline on release/1.9 doesn't match with spec. While spec says the result should be neg, zero, or positive, the baseline checks for a particular integer. Sending the PR |
Fixes #4623
Also enabling a test case that only tests the interface.